#!/bin/bash
#chkconfig:2345 20 90
#description:zookeeper
#processname:zookeeper

export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.232.b09-0.el7_7.x86_64
export PATH=$JAVA_HOME/bin:$PATH



case $1 in
            start)
                /home/root/app/zookeeper-3.4.5-cdh5.7.0/bin/zkServer.sh start
                ;;
            stop)
                /home/root/app/zookeeper-3.4.5-cdh5.7.0/bin/zkServer.sh stop
                ;;
            status)
                /home/root/app/zookeeper-3.4.5-cdh5.7.0/bin/zkServer.sh status
                ;;
            restart)
                /home/root/app/zookeeper-3.4.5-cdh5.7.0/bin/zkServer.sh restart
                ;;
            *)
                echo "require start|stop|status|restart"
                ;;
esac